"""
@program: jihuomaIDEA
@description: 
@author: gaigaibill@gamil.com
@create: 2020-06-30 01:34
"""

import mitmproxy.http
from mitmproxy import ctx


class Counter:
    def __init__(self):
        self.num = 0

    def request(self, flow: mitmproxy.http.HTTPFlow):
        self.num = self.num + 1
        ctx.log.info("We've seen %d flows" % self.num)
# https://blog.wolfogre.com/posts/usage-of-mitmproxy/